import request from '@/utils/request'

// 查询餐馆套餐列表
export function listRespackage(query) {
  return request({
    url: '/system/respackage/list',
    method: 'get',
    params: query
  })
}

export function listRespackage1(query, userId) {
  return request({
    url: '/system/respackage/list1',
    method: 'get',
    params: {
      ...query,
      userId: userId
    }
  })
}

// 查询餐馆套餐详细
export function getRespackage(packageId) {
  return request({
    url: '/system/respackage/' + packageId,
    method: 'get'
  })
}

// 新增餐馆套餐
export function addRespackage(data) {
  return request({
    url: '/system/respackage',
    method: 'post',
    data: data
  })
}

// 修改餐馆套餐
export function updateRespackage(data) {
  return request({
    url: '/system/respackage',
    method: 'put',
    data: data
  })
}

// 删除餐馆套餐
export function delRespackage(packageId) {
  return request({
    url: '/system/respackage/' + packageId,
    method: 'delete'
  })
}
